package factorymodel.abstractfactorymodel;

import factorymodel.abstractfactorymodel.pojo.factory.carFactory;
import factorymodel.abstractfactorymodel.pojo.factory.factoryImpl.huaWeiCarFactory;
import factorymodel.abstractfactorymodel.pojo.factory.factoryImpl.xiaoMiCarFactory;

public class abctractfactorymodel {
    public static void main(String[] args)
        {
            carFactory carFactory = new huaWeiCarFactory();
            //通过华为汽车工厂创建发动机
            carFactory.createEngine();
            //通过华为汽车工厂创建轮胎
            carFactory.createTyre();
            //通过华为汽车工厂创建变速箱
            carFactory.createGearbox();
        }
}
